package DS0419;

public class seqList {
    private final int max=100;
    private Student arr[]= new Student[max];
    private int len =0;

    public void insert(Student date){
        arr[len] =date;
        len++;
    }

    public Student top(int len) {
        return arr[len];
    }

    public String getSex(int i ){
        return arr[i].sex;
    }

    public int length(){
      return len;
    }

    public void display(){
        if(len==0){
            System.out.println("此表为空");
            return;
        }
        for(int i =0;i<len;i++){
            System.out.print(arr[i] +"  ");
        }
        System.out.println();
    }

}
